function fillString(text,length,filler){	
	//converting to string
	text=text+"";
	var numOfChars = length-text.length;
	if(numOfChars<=0) return text;
	return repeatString(filler,numOfChars) + text;
}

function repeatString(text,times){
	var str = "";
	for(i=0;i<times;i++){
		str+=text;
	}
	return str;
}

function arrayToString(aElements){
	var tmp = "";
	
	for(var i = 0; i < aElements.length; i++){
		tmp+= aElements[i] + "\n";
	}
	
	return tmp;
}